package com.cyq.day27.hashmap;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

public class Test {
    public static void main(String[] args) {
        Map<String, Double> map = new HashMap<String, Double>();
        map.put( " pi " , 3.14159);
        map.put( " e ", 2.71828D);
        map.put( " log(1) " , new Double(0.0));
        Collection<Double> values = map.values();
        for (Double d:
             values) {
            System.out.println(d+"+"+map.get(d));
        }
//        Set<Map.Entry<String, Double>> entries = map.entrySet();
//        Iterator<Map.Entry<String, Double>> iterator = entries.iterator();
//        while (iterator.hasNext()){
//            Map.Entry<String, Double> next = iterator.next();
//            System.out.println(next);
//        }
    }
}

